import http from '../util/http.js';

const API={
 
    get:(url,params)=>{return http({url:url,method:'get',params:params})},
    del:(url,id)=>{
        url=url+'/'+id
        return http({url:url,method:'delete'});
    },
    postJson:function(url,data){return http({url:url,method:'post',data:data})},
    postForm:function(url,data){return http({url:url,method:'post',data:data})},

    putJson:function(url,data){return http({url:url,method:'put',data:data})},
    
    getCases:function(url,data){return http({url:url,method:'get',data:data})}

};
export default API;
